<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>资料管理平台</title>
    <link rel="stylesheet" href="/plugin/layui/css/layui.css" th:href="@{/plugin/layui/css/layui.css}">
</head>
<body class="layui-layout-body">

<div class="layui-layout layui-layout-admin">

    <!--顶部和左侧导航-->

    <div class="layui-header">
        <div class="layui-logo">这里有各种学习资料!</div>
        <!-- 头部区域（可配合layui已有的水平导航） -->
        <ul class="layui-nav layui-layout-left">
            <li class="layui-nav-item"><a href="/Blog/shareData/dataAllInfo" th:href="@{/shareData/dataAllInfo}">首页</a></li>
            <li class="layui-nav-item"><a href="#">帮助</a></li>
            <li class="layui-nav-item"><a href="#">联系我们</a></li>


        </ul>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item"><a th:text="'当前登录状态:'+${session.status}" th:href=@{/login/loginStudentView}></a></li>

            <li class="layui-nav-item">
                <a href="javascript:;" th:text="${session.user.name}">
                    <img src="../custom/img/icon.jpg" class="layui-nav-img">
                    ${user.name}
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="#">基本资料</a></dd>
                    <dd><a href="#">安全设置</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item"><a href="/Blog/login/out" th:href="@{/user/out}" >注销</a></li>
        </ul>
    </div>
    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">

            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" lay-filter="test">
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;">资料管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="/Blog/shareData/dataAllInfo" th:href="@{/shareData/dataAllInfo}" >资料信息</a></dd>
                        <dd><a href="/Blog/dataUploadAndDownload/show" th:href="@{/dataUploadAndDownload/show}">上传资料</a></dd>
                        <dd><a href="/Blog/dataUploadAndDownload/downloadAll" th:href="@{/dataUploadAndDownload/downloadAll}">下载资料</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">资料交流分享</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;">下载排行榜</a></dd>
                        <dd><a href="javascript:;">分享心得</a></dd>
                    </dl>
                </li>

            </ul>
            <div class="contain-zheng">
                <div class="box">
                    <div class="face one"></div>
                    <div class="face two"></div>
                    <div class="face three"></div>
                    <div class="face four"></div>
                    <div class="face five"></div>
                    <div class="face six"></div>
                </div>
            </div>
        </div>
    </div>



    <!-- 内容主体区域 -->
    <div class="layui-body">

        <div style="padding: 15px;">
            <form class="layui-form" action="/Blog/dataUploadAndDownload/upload" th:action="@{/dataUploadAndDownload/upload}" method="post" enctype="multipart/form-data">
                <div class="layui-form-item">
                    <label class="layui-form-label">资料名称</label>
                    <div class="layui-input-block">

                        <input type="text" name="dataName" required lay-verify="required" placeholder="请输入资料名称"
                               autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">小组名称</label>
                    <div class="layui-input-block">
                        <input name="groupName" class="layui-input" placeholder="请输入小组名称">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">上传人</label>
                    <div class="layui-input-block">
                        <input type="text" name="upName" required lay-verify="required"
                               autocomplete="off" class="layui-input" readonly="true"   th:value="${session.user.name}">
                    </div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">资料简介</label>
                    <div class="layui-input-block">
                        <textarea name="dataSummary" placeholder="请输入内容" class="layui-textarea" rows="10"></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">上传附件</label>

                    <div class="layui-input-block">
                        <input type="file" name="file" required lay-verify="required"
                               autocomplete="off" class="layui-inline" style="width: 300px;" >

                    </div>
                    <div class="layui-form-mid layui-word-aux">文件大小限制为500MB</div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit>立即提交</button>
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>
            </form>
        </div>
    </div>


    <!--底部区域-->
    <div class="layui-footer">
        © 袁洪201603756 and 朱兴201603753--- 版权所有,仅用于学习交流.
    </div>


</div>
<script src="../plugin/layui/layui.js" th:src="@{/plugin/layui/layui.js}"></script>
<script>


    // var a =${addDataFlag};
    // if (a == 1) {
    // alert("上传成功!")
    // } else if (a == 0) {
    // alert("上传失败!")
    // }

    //JavaScript代码区域
    layui.use('element', function () {
        var element = layui.element;
        console.log(element);

    });
</script>
</body>

</html>